package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.Statistics_membercardDto;
import edu.suda.xsap.entity.Statistics_membercard;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.io.Serializable;
import java.util.List;

@Mapper(componentModel = "spring")
public interface Statistics_membercardConvert {

    @Mapping(source="name", target = "name")
    @Mapping(source="cardid", target = "cardid")
    @Mapping(source="totcount", target = "totcount")
    @Mapping(source="validcount", target = "validcount")
    @Mapping(source="consumecount", target = "consumecount" )
    @Mapping(source="totmoney", target = "totmoney")
    @Mapping(source="consumemoney", target = "consumemoney")
    @Mapping(source="remainmoney", target = "remainmoney")

    Statistics_membercardDto toDto(Statistics_membercard statistics_membercard);

    List<Statistics_membercardDto> toDtoList(List<Statistics_membercard> statisticsMembercards);
}
